import React from "react";
import { configure, addDecorator } from "@storybook/react";
import { withA11y } from "@storybook/addon-a11y";
import { withKnobs } from "@storybook/addon-knobs";
// import { withInfo } from '@storybook/addon-info';
import { withStaticMarkup } from "storybook-react-to-static-markup";
import '../src/styles/index.css'

addDecorator(withA11y);
addDecorator(withKnobs);
addDecorator(withStaticMarkup);
const Padding = storyFn => <div className="p-4">{storyFn()}</div>;
addDecorator(Padding);

const req = require.context("../src", true, /.stories.jsx$/);
function loadStories() {
  req.keys().forEach(filename => req(filename));
}

configure(loadStories, module);
